import request from "@/utils/request";

/**
 * 获取所有的面试列表
 * @param {*} data
 * @returns
 */
export const getArticleList = (data) => {
  return request.get("/admin/interview/query", {
    params: data,
  });
};

/**
 * 删除一条面经
 * @param {string} id
 * @returns
 */
export const delArticleItem = (id) => {
  return request.delete("/admin/interview/remove", {
    data: {
      id,
    },
  });
};

/**
 * 新增面经数据
 * @param {*} data
 * @returns
 */
export const createArticle = (data) => {
  return request.post("/admin/interview/create", data);
};

/**
 * 获取某个面经数据  根据id获取
 * @param {string} id
 * @returns
 */
export const getArticleDetail = (id) => {
  return request.get("/admin/interview/show", {
    params: {
      id,
    },
  });
};

/**
 * 修改某个数据
 * @param {object} data
 *
 */
export const updateArticle = (data) => {
  return request.put("/admin/interview/update", data);
};
